package com.jade.store.operation.entity;
import com.jade.bss.db.IdEntity;
import com.jade.zsy.base.entity.Sku;
import com.jade.zsy.base.entity.Store;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
 * 优惠劵
 */
@Entity
@Table(name = "STORE_OP_COUPON")
public class Coupon extends IdEntity {

    @Column(name = "coupon_no",updatable = false, nullable = false, length = 25)
    private String couponNo;            /*优惠券编号*/

    @Column(name = "inner_or_outer",updatable = true,nullable = false)
    private int innerOrOuter=1;           /*0-内部;1-外部 内部员工或外部客户使用，默认为外部客户使用*/

    @Column(name = "scope",updatable = true,nullable = false)
    private int limite;             /*使用范围:1-全平台通用,2-全平台部分商品,3-部分商家全部商品,4-部分商家部分商品*/

    @Column(name = "activate_time",updatable = true,nullable = false)
    private Date activateTime;    /*生效时间*/

    @Column(name = "end_time")
    private Date endTime;         /*截止时间*/

    @Column(name = "description",updatable = true,nullable = true,length = 2000)
    private String description;     /*使用说明*/

    @Transient
    private boolean able;           /*有效或无效*/

    @Transient
    private List<Store> storeList;  /*指定的商家*/

    @Transient
    private List<Sku> skuList;      /*指定可以使用的商品*/

    public String getCouponNo() {
        return couponNo;
    }

    public void setCouponNo(String couponNo) {
        this.couponNo = couponNo;
    }

    public int getInnerOrOuter() {
        return innerOrOuter;
    }

    public void setInnerOrOuter(int innerOrOuter) {
        this.innerOrOuter = innerOrOuter;
    }

    public int getLimite() {
        return limite;
    }

    public void setLimite(int limite) {
        this.limite = limite;
    }

    public Date getActivateTime() {
        return activateTime;
    }

    public void setActivateTime(Date activateTime) {
        this.activateTime = activateTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public boolean isAble() {
        return able;
    }

    public void setAble(boolean able) {
        this.able = able;
    }

    public List<Store> getStoreList() {
        return storeList;
    }

    public void setStoreList(List<Store> storeList) {
        this.storeList = storeList;
    }

    public List<Sku> getSkuList() {
        return skuList;
    }

    public void setSkuList(List<Sku> skuList) {
        this.skuList = skuList;
    }
}



 
 